package com.junit.unitTest;

public class Largest {
	public int getLargest(int [] list)throws Exception
	{
		if(list == null || list.length == 0)
		{
			throw new Exception("数据不能为空");
		}
		int largestNumber = list[0];
		for (int i = 1; i<list.length; i++)
		{
			if(largestNumber < list[i])
				largestNumber = list[i];
		}
		return largestNumber;
	}
}
